#include "stdafx.h"
#include "money.h"

CMoney::CMoney(std::string name, long double principal, double rate)
:  m_name(name)
 , m_rate(rate)
 , m_principal(principal)
{
    time(&m_startDate);
    time(&m_endDate);
    m_values.clear();
    
}

CMoney::~CMoney()
{
    
}

long double CMoney::getTotal()
{
    return std::accumulate(m_values.begin(), m_values.end(), 0);
}